import request from '@/utils/request'

// 查询滞销代办事项列表
export function listUnsalableBacklog(query) {
  return request({
    url: '/business/unsalableBacklog/list',
    method: 'get',
    params: query
  })
}

// 查询滞销代办事项详细
export function getUnsalableBacklog(id) {
  return request({
    url: '/business/unsalableBacklog/' + id,
    method: 'get'
  })
}

// 新增滞销代办事项
export function addUnsalableBacklog(data) {
  return request({
    url: '/business/unsalableBacklog',
    method: 'post',
    data: data
  })
}

// 修改滞销代办事项
export function updateUnsalableBacklog(data) {
  return request({
    url: '/business/unsalableBacklog',
    method: 'put',
    data: data
  })
}

// 删除滞销代办事项
export function delUnsalableBacklog(id) {
  return request({
    url: '/business/unsalableBacklog/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/unsalableBacklog/export',
    method: 'post',
    data: data
  })
}

// 填写滞销待办事项优化动作
export function editUnsalableOptimizeActions(data) {
  return request({
    url: '/business/unsalableBacklog/editUnsalableOptimizeActions',
    method: 'post',
    data: data
  })
}
